/**
 * 
 */
package ar.com.greensoft.neosystem.model.internacion;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import ar.com.greensoft.neosystem.model.NamedEntity;

/**
 * 
 * @author Jorge E. Villaverde
 * @since 22/06/2013
 * @version 1.0.0
 */
@Entity
@Table(name="remedio")
@NamedQueries({
	@NamedQuery(name=Remedio.FIND_ALL_QUERY_NAME, query="SELECT c FROM Remedio c"),
	@NamedQuery(name=Remedio.FIND_BY_NAME_QUERY_NAME, 
		query="SELECT c FROM Remedio c WHERE c.name = :name"),
	@NamedQuery(name=Remedio.COUNT_QUERY_NAME,    query="SELECT COUNT(c) FROM Remedio c")
})
public class Remedio extends NamedEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7951470374238448594L;

	public static final String FIND_ALL_QUERY_NAME = "Remedio.findAll";
	public static final String FIND_BY_NAME_QUERY_NAME = "Remedio.findByName";
	public static final String COUNT_QUERY_NAME = "Remedio.count";
	
	@ManyToOne
	private Laboratorio laboratorio;

	public Laboratorio getLaboratorio() {
		return laboratorio;
	}

	public void setLaboratorio(Laboratorio laboratorio) {
		this.laboratorio = laboratorio;
	}
}
